package com.mycompany.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "bill")
public class Bill extends AbstractTimestampEntity implements Serializable {

    private static final long serialVersionUID = 1L;
    
    @Id
    @GeneratedValue(strategy=GenerationType.AUTO)
    @Column(name="billId") 
    private Integer billId;
    
    @Column(length=250) 
	private String name;
    
    @Column(columnDefinition="TEXT")
	private String number;
    
    @Column(columnDefinition="TEXT")
   	private String detail;
    
    @Column(columnDefinition="TEXT")
	private String inNumber;
    
	@Column(columnDefinition="TEXT")
	private String outNumber;
   
    @ManyToOne(fetch=FetchType.EAGER)
	@JoinColumn(name="periodId")
    private Period period;
    
    @ManyToOne(fetch=FetchType.EAGER)
	@JoinColumn(name="ruleId")
    private Rule rule;
    
    
	public Integer getBillId() {
		return billId;
	}

	public void setBillId(Integer billId) {
		this.billId = billId;
	}

	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public Period getPeriod() {
		return period;
	}

	public void setPeriod(Period period) {
		this.period = period;
	}

	public Rule getRule() {
		return rule;
	}

	public void setRule(Rule rule) {
		this.rule = rule;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public String getInNumber() {
		return inNumber;
	}

	public void setInNumber(String inNumber) {
		this.inNumber = inNumber;
	}

	public String getOutNumber() {
		return outNumber;
	}

	public void setOutNumber(String outNumber) {
		this.outNumber = outNumber;
	}


    
}
